package com.geeaks.learn.pattern.chain.role;

import com.geeaks.learn.pattern.chain.Ratify;
import com.geeaks.learn.pattern.chain.Request;
import com.geeaks.learn.pattern.chain.Result;

public class DepartmentHeader implements Ratify {
	
	@Override
	public Result deal(Chain chain) {
		Request request = chain.request();
		System.out.println("DepartmentHeader=====>request:" + request.toString());
		if (request.days() > 7) {
			return new Result(false, "你这个完全没必要");
		}
		return new Result(true, "DepartmentHeader：不要着急，把事情处理完再回来！");
	}
}
